<!DOCTYPE html>
<html>
	<head>
		<title>教育经历</title>
		<meta charset="utf-8">
		<meta name="Description" content="" />
		<meta name="Keywords" content="" />
		<meta name="format-detection" content="telephone=no, email=no" />
		<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
		<!-- 忽略页面中的数字识别为电话，忽略email识别 -->
		<meta name="applicable-device" content="mobile" />
		<meta name="apple-mobile-web-app-title" content="" />
		<!-- 添加到主屏后的标题（iOS 6 新增） -->
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<!-- 是否启用 WebApp 全屏模式 -->
		<meta name="HandheldFriendly" content="true" />
		<!-- 针对手持设备优化，主要是针对一些老的不识别viewport的浏览器，比如黑莓 -->
		<meta name="author" content="Jack" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/module/index/css/min.css" />
		<link rel="stylesheet" href="__STATIC__/module/index/css/mui.min.css" />
		<link rel="stylesheet" href="__STATIC__/module/index/css/mui.picker.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/module/index/css/mui.dtpicker.css"/>
		<link rel="stylesheet" href="__STATIC__/module/index/css/mui.poppicker.css" />
		<style type="text/css">
			.mui-btn-blue, .mui-btn-primary, input[type=submit]{
				border: 1px solid #2ba245;
    			background-color: #2ba245;
			}
		</style>
	</head>
	<body>
		<div class="rest-box padding-botom">
			<div class="register-box">
				<div class="max-size">填写教育经历</div>

				<div class="input-outer">
					<div class="info-name">学校名称</div>
					<input type="text" class="input-style name-input" placeholder="请输入学校名称" id="school"  onkeyup="words_deal(15,'school','is-txt')" />
					<span class="txt-num"><i id="is-txt">15</i>/15字</span>
				</div>

				<div class="input-outer">
					<div class="info-name">学历</div>
					<div class="postion-icon-type">
						<input type="text" class="input-style" placeholder="请选择最高学历" readonly="readonly" id="education" />
						<i class="down-icon"></i>
					</div>

				</div>
				
				<div class="input-outer botter">
					<div class="info-name">在校时间</div>
					<div class="sex-flex">	
						<input type="text" placeholder="开始时间" class="select-time margin-sele" readonly="readonly" id="start-time"/>
						<input type="text" placeholder="结束时间" class="select-time" readonly="readonly" id="end-time"/>	
					</div>
				</div>
				
				<div class="input-outer">
					<div class="info-name">所学专业</div>
					<input type="text" class="input-style" id="major" placeholder="填写所学专业"/>
				</div>
				
				<div class="input-outer">
					<div class="info-name">自我介绍</div>
					<textarea  class="input-style textarea-input" placeholder="介绍一下自己吧"></textarea>
				</div>

			</div>

		</div>
		<div class="postion-btn">
			<div class="next-box">
				<a class="moer-btn" href="javascript:history.back(-1)">返回上一步</a>
				<a class="moer-btn-next" onclick="next_fun()" href="javascript:;">完成</a>
			</div>
		</div>
	</body>
	<script src="__STATIC__/module/index/js/jquery-3.1.0.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="__STATIC__/module/index/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="__STATIC__/module/index/js/mui.picker.js" type="text/javascript" charset="utf-8"></script>
	<script src="__STATIC__/module/index/js/mui.dtpicker.js" type="text/javascript" charset="utf-8"></script>
	<script src="__STATIC__/module/index/js/mui.poppicker.js" type="text/javascript" charset="utf-8"></script>
	<script src="__STATIC__/module/index/js/select_time.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		select_pick(
			'education',
			[
				{education_id: 1, text: "高中及以下"},
				{education_id: 2, text: "中专"},
				{education_id: 3, text: "大专"},
				{education_id: 4, text: "本科"},
				{education_id: 5, text: "硕士"},
				{education_id: 6, text: "博士"},
				{education_id: 7, text: "博士后"}
			],
			'education_id'
		)
		select_time('start-time');
		select_time('end-time');
		var is=true;
		function next_fun(){
			var school=$("#school").val();
			var education=$('#education').val();
			var start_time=$('#start-time').val();
			var end_time=$('#end-time').val();
			var major=$('#major').val();
			var cont=$('#cont').val();
//			if($.trim(school) == ''){
//				mui.toast("请输入学校名称！","text");
//				return false;
//			}
//			if($.trim(education) == ''){
//				mui.toast("请选择学历！","text");
//				return false;
//			}
//			if($.trim(start_time) == '' || $.trim(end_time) == ''){
//				mui.toast("请输入起始时间！","text");
//				return false;
//			}
			if(is) {
				is = false;
				$.post("{:url('education')}", {
					school: school,
					education: education,
					start_time: start_time,
					end_time: end_time,
					major: major,
					cont: cont
				}, function (data) {
					if (data.code == 0) {
						mui.toast("编辑完成！","text");
						location.href = "http://www.shtxhr.com";
					} else {
						is=true;
						mui.toast(data.msg, "text");
					}
				}, 'json');
			}
		}
	</script>
</html>
